<script>
var loginUrl = "{:url('admin/index/login')}";
var yzmUrl = "{:url('admin/index/captcha')}?soure=adminlogin&key={$captcha_key}";
var _captchaKey = '{$captcha_key}';
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$site.chartset}"> 
<meta http-equiv="Pragma" content="no-cache"> 
<meta http-equiv="Cache-Control" content="no-cache"> 
<meta http-equiv="Expires" content="no-cache"> 
<title>管理登录</title>
<script type="text/javascript">var _returnUrl = '{$backurl}';</script>
<link rel="shortcut icon" href="/favicon.ico?v={$site.version}" />
<script src="__STATIC__/jquery-3.0.0.min.js?v={$site.version}"></script>
<link href="__STATIC__/layui-2.4.2/css/layui.css?v={$site.version}" rel='stylesheet' type='text/css' />
<script src="__STATIC__/layui-2.4.2/layui.all.js?v={$site.version}"></script>
<script src="__ADMIN__/common.js?v={$site.version}"></script>
<script src="__ADMIN__/login/login.js?v={$site.version}"></script>
<link href="__ADMIN__/login/login.css?v={$site.version}" rel='stylesheet' type='text/css' />
<script src="__ADMIN__/login/jparticle.min.js?v={$site.version}"></script>
<link href="__ADMIN__/public.css?v={$site.version}" rel="stylesheet">
</head>
<body>
<style>
.layui-elem-quote{background-color: inherit!important;}
.layui-input, .layui-select, .layui-textarea{background-color: inherit; padding-left: 30px;}
.layui-form-item {margin-bottom: 40px;}
</style>
		<!-- Head -->
		<div class="layui-fluid">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-sm12 layui-col-md12 zyl_mar_01">
					<blockquote class="layui-elem-quote" style="font-size:30px;">XX公司</blockquote>
				</div>
			</div>
		</div>
		<!-- Head End -->
		
		<!-- Carousel -->
		<div class="layui-row">
			<div class="layui-col-sm12 layui-col-md12">
				<div class="layui-carousel zyl_login_height" id="zyllogin" lay-filter="zyllogin">
					<div carousel-item="">
						<div>
							<div class="zyl_login_cont"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- Carousel End -->
		
		<!-- Footer -->
		<div class="layui-row">
			<div class="layui-col-sm12 layui-col-md12 zyl_center zyl_mar_01">
				© 2017 - {:date('Y')} XX公司
			</div>
		</div>
		<!-- Footer End -->

		<!-- LoginForm -->
		<div class="zyl_lofo_main">
			<fieldset class="layui-elem-field layui-field-title zyl_mar_02">
				<legend>欢迎登陆 - 后台管理系统</legend>
			</fieldset>
			<div class="layui-row layui-col-space15" style="padding: 0px 30px;">
				<form class="layui-form zyl_pad_01" action="" onsubmit="return false;">
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-form-item">
							<input type="text" name="mName" lay-verify="required|mName" autocomplete="off" placeholder="输入登录账号" class="layui-input" id="mName">
							<i class="layui-icon layui-icon-username zyl_lofo_icon"></i>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-form-item">
							<input type="password" name="mPwd" lay-verify="required|mPwd" autocomplete="off" placeholder="输入登录密码" id="mPwd" class="layui-input">
							<i class="layui-icon layui-icon-password zyl_lofo_icon"></i>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						<div class="layui-row">
							<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
								<div class="layui-form-item">
									<input type="text" name="vercode" id="vercode" lay-verify="required|vercodes" autocomplete="off" placeholder="验证码" class="layui-input" maxlength="4">
									<i class="layui-icon layui-icon-vercode zyl_lofo_icon"></i>
								</div>
							</div>
							<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
								<div class="zyl_lofo_vercode zylVerCode">
									<div class="captcha-img"><img src="" alt="点击更换验证码"/></div>
								</div>
							</div>
						</div>
					</div>
					<div class="layui-col-sm12 layui-col-md12">
						<button class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="logbtn" id="loginFormBtn">立即登录</button>
					</div>

					<div class="layui-col-sm12 layui-col-md12" style="text-align: center;margin-top:30px;cursor: pointer;" onclick="forgotPwd();">
						忘记登录密码？
					</div>
				</form>
			</div>
		</div>
		<!-- LoginForm End -->
		<script>
			layui.use(['carousel', 'form'], function(){
				var carousel = layui.carousel
				,form = layui.form;
				//自定义验证规则
				form.verify({
					mName: function(value){
						if(value.length < 5){
							return '账号至少得5个字符';
						}
					}
					,mPwd: [/^[\S]{6,32}$/,'密码必须6到12位，且不能出现空格']
				});
				//监听提交
				form.on('submit(logbtn)', function(data){
					_loginUser();
					return false;
				});
				//设置轮播主体高度
				var zyl_login_height = $(window).height()/1.3;
				var zyl_car_height = $(".zyl_login_height").css("cssText","height:" + zyl_login_height + "px!important");
				//Login轮播主体
			 	carousel.render({
					elem: '#zyllogin'//指向容器选择器
					,width: '100%' //设置容器宽度
					,height:'zyl_car_height'
					,arrow: 'always' //始终显示箭头
					,anim: 'fade' //切换动画方式
					,autoplay: true //是否自动切换false true
					,arrow: 'hover' //切换箭头默认显示状态||不显示：none||悬停显示：hover||始终显示：always
					,indicator: 'none' //指示器位置||外部：outside||内部：inside||不显示：none
					,interval: '5000' //自动切换时间:单位：ms（毫秒）
				});
				//监听轮播--案例暂未使用
				carousel.on('change(zyllogin)', function(obj){
					var loginCarousel = obj.index;
				});
				//粒子线条
				$(".zyl_login_cont").jParticle({
					background: "rgba(0,0,0,0)",//背景颜色
					color: "#fff",//粒子和连线的颜色
					particlesNumber:100,//粒子数量
					//disableLinks:true,//禁止粒子间连线
					//disableMouse:true,//禁止粒子间连线(鼠标)
					particle: {
					    minSize: 1,//最小粒子
					    maxSize: 3,//最大粒子
					    speed: 30,//粒子的动画速度
					 }
				});
			});
			function forgotPwd()
			{
			   layer.alert('若您已忘记登录密码，请联系管理员重置。');
			}
		</script>
	</body>
</html>